<template>
	<view class="container">
		<view class="mine">
			<view class="mineInfo">
				<view class="avatar">
					<image src="@/static/img/avatar.png" mode="aspectFill"></image>
				</view>
				<view class="name">
					<view class="nickName">12312312313</view>
				</view>
			</view>
			<!-- <view class="mineSet">
				<uni-icons type="right" size="16" color="#fff"></uni-icons>
			</view> -->
		</view>
		<uni-list>
			<uni-list-item clickable title="报修" to="/pages/mine/fix/list">
				<template v-slot:footer>
					<uni-icons type="right" size="16" color="#bbb"></uni-icons>
				</template>
			</uni-list-item>
			<uni-list-item clickable title="我的合同" to="/pages/mine/cont/list">
				<template v-slot:footer>
					<uni-icons type="right" size="16" color="#bbb"></uni-icons>
				</template>
			</uni-list-item>
			<uni-list-item clickable title="联系管家" @click="phone">
				<template v-slot:footer>
					<uni-icons type="phone-filled" size="16" color="#2979ff"></uni-icons>
				</template>
			</uni-list-item>
		</uni-list>
		<uni-list>
			<view class="out" hover-class="hoverClass" @click="outLogin">退出登录</view>
		</uni-list>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	onShow() {},
	onPullDownRefresh() {
		setTimeout(() => {
			this.stopPull();
		}, 1000);
	},
	methods: {
		stopPull() {
			uni.stopPullDownRefresh();
		},
		phone(){
			uni.makePhoneCall({
				phoneNumber: '114'
			});
		},
		outLogin() {
			uni.clearStorageSync();
			uni.reLaunch({
				url: '/pages/public/login'
			});
		}
	}
};
</script>

<style lang="scss">
.container {
	padding: 20rpx 40rpx;
	.mine {
		padding: 60rpx 30rpx;
		background: linear-gradient(to right, #5287f9, #4399fc);
		border-radius: 20rpx;
		border-top-right-radius: 60rpx;
		box-shadow: $uni-shadow-sm;
		margin-bottom: 20rpx;
		color: #fff;
		display: flex;
		align-items: center;
		justify-content: space-between;
		.mineInfo {
			display: flex;
			align-items: center;
			.avatar {
				width: 80rpx;
				height: 80rpx;
				margin-right: 20rpx;
				border-radius: 100%;
				overflow: hidden;
				image {
					width: 80rpx;
					height: 80rpx;
				}
			}
			.nickName {
				font-size: 30rpx;
				margin-bottom: 10rpx;
			}
			.userName {
				font-size: 24rpx;
			}
		}
	}
	.uni-list {
		border-radius: 20rpx;
		margin-bottom: 50rpx;
		overflow: hidden;
		box-shadow: $uni-shadow-sm;
		.out {
			text-align: center;
			height: 100rpx;
			line-height: 100rpx;
			color: $uni-error;
			font-weight: bold;
			font-weight: 32rpx;
		}
	}
}
</style>
